<template>
   <ul>
    <li v-for="(item, index) in list" :key="item.id">
        <h3>{{ item.title }}</h3>
        <p>{{ item.desc }}</p>
        <img :src="item.img" alt="">
    </li>
   </ul>
</template>

<script setup>
    import axios from "axios";
    import { ref, onMounted } from 'vue'

    const list = ref([])

    onMounted(()=>{
        axios.get('/api/list').then(res =>{
            console.log(res, 'resss');
            if(res.data.code === 200 && res.status === 200){
                list.value = res.data.data
            }
        })
    })

</script>

<style lang="scss">
  
</style>